package com.groupbuying.cheetah.currencyCustomer.dao;

import com.groupbuying.cheetah.currencyCustomer.dto.CustomerCurrencyDTO;
import com.groupbuying.cheetah.currencyCustomer.dto.CustomerCurrencyLogDTO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface CustomerUshopDao {

    BigDecimal getStartTimasCurrency(Map<String,Object> map);

    BigDecimal getEndTimasCurrency(Map<String,Object> map);
    /**
     *
     查询增加金额
     * @param map
     * @return
     */
    BigDecimal getAddCurrencyNumber(Map<String,Object> map);
    /**
     *
     查询增加金额
     * @param map
     * @return
     */
    BigDecimal getRedCurrencyNumber(Map<String,Object> map);
    //统计数量
    int countForCurrency(Map<String,Object> map);
    //查询详情
    List<CustomerCurrencyDTO> getDetail(Map<String,Object> map);
    //查询用户积分详情
    List<CustomerCurrencyLogDTO> getCurrencyLogByCustomerId(Map<String,Object> map);

    /**
     * 统计同一个customerId下积分log数量
     * @param map
     * @return
     */
    int countForCurrencyLog(Map<String,Object> map);

    /**
     * 统计所选月份积分统计
     */
    List<Map<String,Object>> getMouthCurrency(Map<String,String> map);

    /**
     * 平台积分管理平台详情
     * @param map
     * @return
     */
    List<Map<String,Object>> getCurrenManage(Map<String,Object> map);

    /**
     * 统计数量
     * @param map
     * @return
     */
    int countForCurencyManage(Map<String,Object> map);

    Map<String,Object> sumCurrency(Map<String,Object> map);
}
